package com.cxso.example.request.report;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Getter
@Setter
public class ReportDriverRequest implements Serializable {


    @Schema(description = "主体id")
    private String bodyId;

    @Schema(description = "司机姓名", example = "叶燕")
    @NotBlank(message = "司机姓名不能为空")
    private String driverName;

    @Schema(description = "身份证号", example = "420281199910101234")
    @NotBlank(message = "身份证号不能为空")
    private String drivingLicense;

    @Schema(description = "准驾车型", example = "使用总质量4.5吨及以下普通货运车辆从事普通货物运输经营的驾驶员必填，根据机动车驾驶证填写。")
    private String vehicleClass;

    @Schema(description = "驾驶证发证机关", example = "使用总质量4.5吨及以下普通货运车辆从事普通货物运输经营的驾驶员必填，根据机动车驾驶证填写。")
    private String issuingOrganizations;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "驾驶证有效期自格式不正确")
    @Schema(description = "驾驶证有效期自", example = "使用总质量4.5吨及以下普通货运车辆从事普通货物运输经营的驾驶员必填，根据机动车驾驶证填写。YYYYMMDD")
    private String validPeriodFrom;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "驾驶证有效期至格式不正确")
    @Schema(description = "驾驶证有效期至", example = "使用总质量4.5吨及以下普通货运车辆从事普通货物运输经营的驾驶员必填，根据机动车驾驶证填写。YYYYMMDD")
    private String validPeriodTo;

    @Schema(description = "从业资格证号", example = "必填，驾驶员从业资格证号，使用总质量4.5吨及以下普通货运车辆从事普通货物运输经营的驾驶员，填写“驾驶员身份证前6位+000000000000”。")
    private String qualificationCertificate;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "从业资格证有效期自格式不正确")
    @Schema(description = "从业资格证有效期自", example = "从业资格证有效期自，根据从业资格证填写。yyyyMMdd")
    private String qualificationCertificateFrom;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "从业资格证有效期至格式不正确")
    @Schema(description = "从业资格证有效期至", example = "从业资格证有效期至，根据从业资格证填写。yyyyMMdd")
    private String qualificationCertificateTo;

    @Schema(description = "手机号码", example = "18666666666")
    private String telephone;

    @Schema(description = "地址", example = "地址信息")
    private String address;

    @Schema(description = "备注", example = "示例")
    private String remark;

    @Schema(description = "身份证正面图片")
    private String idCardFrontImg;

    @Schema(description = "身份证反面图片")
    private String idCardBackImg;

    @Schema(description = "驾驶证正面图片")
    private String driverLicenseFrontImg;

    @Schema(description = "驾驶证反面图片")
    private String driverLicenseBackImg;

    @Pattern(regexp = "^\\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])$", message = "身份证有效期格式不正确")
    @Schema(description = "身份证有效期")
    public String driverCardStartLine;

    @Schema(description = "从业资格证图片")
    private String professionalQualificationCertificateImg;

    @Schema(description = "司机挂靠协议(多个以,号分割)")
    private String driverAgreementUrl;

}
